// customlineedit.h
#ifndef CUSTOMLINEEDIT_H
#define CUSTOMLINEEDIT_H

#include <QLineEdit>
#include <QKeyEvent>
#include <QDialog>
#include <QVBoxLayout>
#include <QPushButton>
#include <QApplication>
#include <QScreen>

class CustomLineEdit : public QLineEdit
{
    Q_OBJECT

public:
    explicit CustomLineEdit(QWidget *parent = nullptr);

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void keyPressEvent(QKeyEvent *event) override;

private slots:
    void showFullScreenInput();

private:
    bool m_isFullScreenInputActive = false;

    class FullScreenInputDialog : public QDialog
    {
    public:
        explicit FullScreenInputDialog(const QString &text, QWidget *parent = nullptr);
        QString text() const;

    protected:
        void showEvent(QShowEvent *event) override;

    private:
        QLineEdit *m_lineEdit;
    };
};

#endif // CUSTOMLINEEDIT_H